package org.xpandaframework.base.exception;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * <p>
 * CopyRright (c)2008-2014: Camelot
 * <p>
 * Project: xpandaframework Maven Webapp
 * <p>
 * Module ID: <模块类编号可以引用系统设计中的类编号>
 * <p>
 * Comments: 异常常量类型定义
 * <p>
 * JDK version used: JDK1.7
 * <p>
 * NameSpace: org.xpandaframework.base.exception.ExceptionConstants.java
 * <p>
 * Author: Angus
 * <p>
 * Create Date: 2014-11-24
 * <p>
 * Modified By: <修改人中文名或拼音缩写>
 * <p>
 * Modified Date: <修改日期>
 * <p>
 * Why & What is modified: <修改原因描述>
 * <p>
 * Version: v1.0
 */
public class ExceptionConstants {

  public static final String Code_0000 = "0000";
  public static final String Msg_0000 = "输入参数不合法!";

  public static final String Code_0100 = "0100";
  public static final String Msg_0100 = "";

  public static final String Code_9999 = "9999";
  public static final String Msg_9999 = "其它错误!";

  private static Map<String, String> returnCodeMap = new ConcurrentHashMap<String, String>();

  public static Map<String, String> getReturnCodeMap() {
    if (returnCodeMap.isEmpty()) {
      returnCodeMap.put(Code_0000, Msg_0000);
      returnCodeMap.put(Code_0100, Msg_0100);
      returnCodeMap.put(Code_9999, Msg_9999);
    }
    return returnCodeMap;
  }
}
